#include "Device.hpp"
#include "Logger.hpp"
#include <Windows.h>

namespace ge {

//----------------------------------------------------------------------------//
// Device::Hook
//----------------------------------------------------------------------------//

struct Device::Hook
{
     static LRESULT CALLBACK Callback( HWND _window, UINT _msg, WPARAM _w_param, LPARAM _l_param )
     {
          OsEvent _event;
          _event.result = 0;
          _event.window = _window;
          _event.msg = _msg;
          _event.w_param = _w_param;
          _event.l_param = _l_param;
          if( Device::Instance()._HandleOsEvent( _event ) ) return _event.result;
          return DefWindowProcA( _window, _msg, _w_param, _l_param );
     };
};

//----------------------------------------------------------------------------//
// Device
//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//
Device::Device( void )
{
     m_filesystem = new FileSystem();
     geLogMsg( "Device: Startup ..." );
}
//----------------------------------------------------------------------------//
Device::~Device( void )
{
     
}
//----------------------------------------------------------------------------//
void* Device::_GetCallback( void )
{
     return (void*)&Hook::Callback;
}
//----------------------------------------------------------------------------//
bool Device::_HandleOsEvent( OsEvent& _event )
{
 return false;
}
//----------------------------------------------------------------------------//


//WPARAM
//LRESULT


//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//

} // namespace ge
